//------------------------------------------------------------------------------------
#ifndef __CSPRITE_H__
#define __CSPRITE_H__
//------------------------------------------------------------------------------------
#include <QPainter>
#include <QPoint>
//------------------------------------------------------------------------------------
class CSprite {
    public:
        virtual ~CSprite(void) {}
        virtual void draw(QPainter *painter, int idxImage) = 0;
		virtual int getNbImage(void) = 0;
		
		void setPosition(QPoint position) { this->position = position; }
        void next(void) { position.rx()+=incX; position.ry()+=incY; }
        void setIncX(int incX) { this->incX = incX; incY = 0; }
        void setIncY(int incY) { this->incY = incY; incX = 0; }
        void setInc(int incX, int incY) { this->incX = incX; this->incY = incY; }
        const QPoint getPosition(void) { return position; }
        int getIncX(void) { return incX; }
        int getIncY(void) { return incY; }
        int getIndex(void);
    protected:
        void draw(QPainter *painter, QImage image);
    private:
        int incX;
        int incY;
        QPoint position;
};
//------------------------------------------------------------------------------------
#endif //__CSPRITE_H__
//------------------------------------------------------------------------------------
